#include "StdAfx.h"
#include "NtlPacketCU.h"

const char * s_packetName_CU[] =
{
	DECLARE_PACKET_NAME( CU_HEARTBEAT ),

	DECLARE_PACKET_NAME( CU_SERVER_FARM_INFO ),
	DECLARE_PACKET_NAME( CU_SERVER_CHANNEL_INFO ),

	DECLARE_PACKET_NAME( CU_LOGIN_RES ),

	DECLARE_PACKET_NAME( CU_CHARACTER_SERVERLIST_RES ),
	DECLARE_PACKET_NAME( CU_CHARACTER_SERVERLIST_ONE_RES ),
	DECLARE_PACKET_NAME( CU_CHARACTER_ADD_RES ),
	DECLARE_PACKET_NAME( CU_CHARACTER_DEL_RES ),
	DECLARE_PACKET_NAME( CU_CHARACTER_SELECT_RES ),
	DECLARE_PACKET_NAME( CU_CHARACTER_INFO ),	
	DECLARE_PACKET_NAME( CU_CHARACTER_LOAD_RES ),
	DECLARE_PACKET_NAME( CU_CHARACTER_EXIT_RES ),
	DECLARE_PACKET_NAME( CU_CHARACTER_DEL_CANCEL_RES ),	
	//DECLARE_PACKET_NAME( CU_CHARACTER_DEL_INFO ),

	DECLARE_PACKET_NAME( CU_DISCONNECTED_NFY ),

	DECLARE_PACKET_NAME( CU_SERVER_FARM_INFO_REFRESHED_NFY ),
	DECLARE_PACKET_NAME( CU_SERVER_CHANNEL_INFO_REFRESHED_NFY ),

	DECLARE_PACKET_NAME( CU_CONNECT_WAIT_CHECK_RES ),
	DECLARE_PACKET_NAME( CU_CONNECT_WAIT_COUNT_NFY ),
	DECLARE_PACKET_NAME( CU_CONNECT_WAIT_CANCEL_RES ),
	DECLARE_PACKET_NAME( CU_CONNECT_WAIT_CANCEL_NFY ),
	DECLARE_PACKET_NAME( CU_NETMARBLEMEMBERIP_NFY ),

	DECLARE_PACKET_NAME( CU_CHARACTER_DEL_NFY ),
	DECLARE_PACKET_NAME( CU_CHARACTER_RENAME_RES ),
	
};


//------------------------------------------------------------------
//
//------------------------------------------------------------------
const char * NtlGetPacketName_CU(WORD wOpCode)
{
	if( wOpCode < CU_OPCODE_BEGIN )
	{
		return "NOT DEFINED PACKET NAME : OPCODE LOW";
	}

	if( wOpCode > CU_OPCODE_END )
	{
		return "NOT DEFINED PACKET NAME : OPCODE HIGH";
	}

	int nIndex = wOpCode - CU_OPCODE_BEGIN;
	if( nIndex >= _countof( s_packetName_CU) )
	{
		return "OPCODE BUFFER OVERFLOW";
	}

	return s_packetName_CU[ nIndex ];
}

